<template>
    <div>
        这是支付页
    </div>
</template>

<script setup>
import { onMounted } from "vue";
import axios from "../utils/request.ts"
import qs from 'qs'
onMounted(()=>{
    let data = {
        out_trade_no: 'this.$route.query.out_trade_no',
        trade_no: 'this.$route.query.trade_no',
        pay_status: 'this.$route.query.pay_status'
    }
    if(data.pay_status === '1'){
        console.log('支付成功')
    }
    axios({
        url: '/api/queryOrder',
        method: 'post',
        headers:{
            'Content-Type': 'application/x-www-form-urlencoded'
        },
        data: qs.stringify(data)
    }).then(res=>{
        console.log(res)
    })
})
</script>

<style scoped>

</style>